n = int(input())

N = range(n//2)
dis = []

for b in N:
    for a in N[b+1:]:
        if a > b:
            res = a*a-b*b
            if 1 <= res <= 10:
                if res not in dis:
                    dis.append(res)

print(len(dis))
